//
//  IBaseNaviController.swift
//  invest_account_books
//
//  Created by volientDuan on 2017/11/16.
//  Copyright © 2017年 volient. All rights reserved.
//

import UIKit

class IBaseNaviController: UINavigationController {
    override init(rootViewController: UIViewController) {
        super.init(rootViewController: rootViewController)
        self.viewControllers = [rootViewController]
    }
    override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
        super.init(nibName: nil, bundle: nil)
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        config();
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    // MARK: - custom
    func config() {
        self.navigationBar.isTranslucent = false;
    }

    // MARK: - Navigation
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        if self.childViewControllers.count > 0 {
            viewController.hidesBottomBarWhenPushed = true;
        }
    }

}
